﻿using DirectSell.Model.TreeList;
using DirectSell.Model.User;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Direct.IDAL.Manager.UserCenter
{
    public interface IBackRefreeMapRepository:IBaseManagerRepository
    {
        #region 查询第一层
        /// <summary>
        /// 查询第一层
        /// </summary>
        /// <param name="UserCode"></param>
        /// <returns></returns>
        Task<UserInforMationDetails> GetInfo(string UserCode);
        #endregion

        #region 根据推荐人向后查
        /// <summary>
        /// 根据推荐人向后查
        /// </summary>
        /// <param name="UserCode"></param>
        /// <returns></returns>
        Task<IList<UserInforMationDetails>> QueryBehind(string UserCode);
        #endregion

        #region 根据ID获取编号
        /// <summary>
        /// 根据ID获取编号
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        string QueryCode(int id);
        #endregion

        #region 判断是否为父级
        /// <summary>
        /// 判断是否为父级
        /// </summary>
        /// <param name="usercode"></param>
        /// <returns></returns>
        bool CheckIsParent(string usercode);
        #endregion

        #region 获取树状图
        /// <summary>
        /// 获取树状图
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<IList<ZTreeList>> GetZtreeList(int id);
        #endregion

        #region 获取下一级
        /// <summary>
        /// 获取下一级
        /// </summary>
        /// <param name="userid"></param>
        /// <returns></returns>
        Task<IList<ZTreeList>> GetNext(int userid);
        #endregion
    }
}
